package com.allen.imsystem.friend.model.pojo;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Date;

@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="Friend对象", description="查询某个用户的好友列表的方法，与user_info表连表")
public class Friend implements Serializable{

    private static final long serialVersionUID=1L;

    @ApiModelProperty(value = "自增id")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty(value = "a用户账号")
    private String uidA;

    @ApiModelProperty(value = "b用户账号")
    private String uidB;

    @ApiModelProperty(value = "a用户在b用户的那个好友分组的id")
    private Integer aInBFgroupId;

    @ApiModelProperty(value = "b用户在a用户的那个好友分组的id")
    private Integer bInAFgroupId;

    @ApiModelProperty(value = "a是否删除b，1->是，0->否")
    private Boolean aDeleteB;

    @ApiModelProperty(value = "b是否删除a    1->是，0->否")
    private Boolean bDeleteA;

    @ApiModelProperty(value = "创建时间")
    @TableField(fill = FieldFill.INSERT)
    private Date createdTime;

    @ApiModelProperty(value = "更新时间")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;

    public Friend() {
    }

    public Friend(String uidA, String uidB, Integer aInBFgroupId, Integer bInAFgroupId) {
        this.uidA = uidA;
        this.uidB = uidB;
        this.aInBFgroupId = aInBFgroupId;
        this.bInAFgroupId = bInAFgroupId;
        this.aDeleteB = false;
        this.bDeleteA = false;
    }
}
